<nav class="navbar navbar-inverse" style="position:relative; top:0; width:100%;">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/"><img src="/img/logo.png" width="36px" height="36px" alt="intrigue"></a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse">
            <ul class="nav navbar-nav">
              <li><a href="/<%= @project_name %>/start">[<%= @project_name %>]</a></li>
              <li><a href="/<%= @project_name %>/start">Start</a></li>
              <li><a href="/<%= @project_name %>/entities">Entities</a></li>
              <li><a href="/<%= @project_name %>/results">Results</a></li>
              <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">Analysis<span class="caret"></span></a>
                <ul class="dropdown-menu">
                  <li><a href="/<%= @project_name %>/graph">Graph</a></li>
                  <li><a href="/<%= @project_name %>/analysis/domains?length=2">Domains</a></li>
                  <li><a href="/<%= @project_name %>/analysis/systems">Systems</a></li>
                  <li><a href="/<%= @project_name %>/analysis/services">Services</a></li>
                  <li><a href="/<%= @project_name %>/analysis/certificates">Certificates</a></li>
                  <li><a href="/<%= @project_name %>/analysis/applications">Applications</a></li>
                  <li><a href="/<%= @project_name %>/analysis/stats/applications">Application Stats</a></li>
                  <li><a href="/<%= @project_name %>/analysis/javascripts">JS Libraries</a></li>
                </ul>
              </li>
              <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">Export<span class="caret"></span></a>
                <ul class="dropdown-menu">
                  <li><a href="/<%= @project_name %>/export/csv">Download CSV</a></li>
                  <li><a href="/<%= @project_name %>/export/json">Download JSON</a></li>
                  <li><a href="/<%= @project_name %>/export/applications/csv">Download Application CSV</a></li>
                  <li><a href="/<%= @project_name %>/export/gexf">Download Graph (Gephi)</a></li>
                  <li><a href="/<%= @project_name %>/export/graph_json">Download Graph (JSON)</a></li>
                  <% Intrigue::HandlerFactory.handlers.each do |h| %>
                    <% next unless h.metadata[:type] == "export" %>
                    <li><a href=/<%= "#{@project_name}/handle/#{h.metadata[:name]}" %>><%= "[handler] #{h.metadata[:pretty_name]}" %></a></li>
                  <% end %>
                </ul>
              </li>
              <!--<li><a href="/<%= @project_name %>/findings">Findings</a></li>-->
              <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">System<span class="caret"></span></a>
                <ul class="dropdown-menu">
                  <li><a href="/<%= @project_name %>/system/config">Configure</a></li>
                  <!-- <li><a href="/<%= @project_name %>/system/tasks">Tasks</a></li>-->
                  <li><a href="/sidekiq">Sidekiq</a></li>
                </ul>
              </li>
            </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>
